package com.chexiehui.jc.mvp.car;

import com.chexiehui.jc.Constants;
import com.chexiehui.jc.base.BaseModel;
import com.chexiehui.jc.base.BasePage;
import com.chexiehui.jc.base.BaseView;
import com.chexiehui.jc.entity.ShopInfo;
import com.chexiehui.jc.entity.SpecialCarInfo;

import java.util.List;

import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * @Description 店铺详情
 * @Auth SongJun
 * @Date 2020/05/21 00:18
 **/
public interface ShopDetailsCovenant {

    interface View extends BaseView {
        void onGetShopInfoSuccess(BaseModel<ShopInfo> successResult);

        void onGetShopInfoFailure(BaseModel<Object> failureResult);

        void onGetCarListSuccess(BaseModel<BasePage<SpecialCarInfo>> successResult);

        void onGetCarListFailure(BaseModel<Object> failureResult);

        String getShopId();
    }

    interface Stores {
        @FormUrlEncoded
        @POST(Constants.URL_GET_SHOP_DETAIL)
        Observable<BaseModel<ShopInfo>> getShopInfo(@Field("Id") String Id);

        @FormUrlEncoded
        @POST(Constants.URL_GET_CAR_SHOP_SPECIAL_LIST)
        Observable<BaseModel<BasePage<SpecialCarInfo>>> getCarList(
                @Field("Id") String Id,
                @Field("pageIndex") int pageIndex,
                @Field("pageSize") int pageSize);

    }

    interface Presenter {
        void getShopInfo();

        void getCarList(int pageIndex);
    }

}